// 对外暴露配置的路由（无需权限设置的常量路由）
export const constantRoute = [
  {
    // 登录页
    path: '/login',
    name: 'login', // 命名路由
    meta: {
      title: '登录',
      hidden: false,
      icon: 'Promotion'
    },
    component: () => import('@v/login/index.vue')
  },
  {
    // 首页
    path: '/',
    name: 'layout', // 命名路由
    meta: {
      title: '',
      hidden: false,
      icon: ''
    },
    redirect: '/home',
    component: () => import('@v/layout/index.vue'),
    children: [
      {
        // 首页
        path: '/home',
        meta: {
          title: '首页',
          hidden: false,
          icon: 'HomeFilled'
        },
        component: () => import('@v/home/index.vue')
      },
    ]
  },
  {
    path: '/screen',
    name: 'Screen', // 命名路由
    meta: {
      title: '数据大屏',
      icon: 'Platform'
    },
    component: () => import('@v/screen/index.vue')
  },
  {
    path: '/404',
    name: '404', // 命名路由
    meta: {
      title: '404',
      hidden: true,
      icon: 'WarnTriangleFilled'
    },
    component: () => import('@v/404/index.vue')
  },
  {
    // 如果上面都匹配不到，则走这里
    path: '/:pathMatch(.*)',
    redirect: '/404', // 重定向到404
    name: 'Any',
    meta: {
      title: '任意页',
      hidden: true,
      icon: 'MoreFilled'
    },
  },
  {
    path: '/acl',
    name: 'Acl', // 命名路由
    meta: {
      title: '权限管理',
      icon: 'Lock'
    },
    redirect: '/acl/user',
    component: () => import('@v/layout/index.vue'),
    children: [
      {
        path: '/acl/user',
        name: 'Acl',
        component: () => import('@v/acl/user/index.vue'),
        meta: {
          title: '用户管理',
          icon: 'User'
        },
      },
      {
        path: '/acl/role',
        name: 'Role',
        component: () => import('@v/acl/role/index.vue'),
        meta: {
          title: '角色管理',
          icon: 'UserFilled'
        },
      },
      {
        path: '/acl/permission',
        name: 'Permission',
        component: () => import('@v/acl/permission/index.vue'),
        meta: {
          title: '菜单管理',
          hidden: false,
          icon: 'Histogram'
        },
      },
    ]
  },
  {
    path: '/product',
    name: 'Product', // 命名路由
    meta: {
      title: '商品管理',
      icon: 'Goods'
    },
    redirect: '/product/spu',
    component: () => import('@v/layout/index.vue'),
    children: [
      {
        path: '/product/spu',
        name: 'Spu',
        component: () => import('@v/product/spu/index.vue'),
        meta: {
          title: 'SPU',
          icon: 'TrendCharts'
        },
      },
      {
        path: '/product/trademark',
        name: 'Trademark',
        component: () => import('@v/product/trademark/index.vue'),
        meta: {
          title: '品牌管理',
          icon: 'ShoppingCartFull'
        },
      },
      {
        path: '/product/attr',
        name: 'Attr',
        component: () => import('@v/product/attr/index.vue'),
        meta: {
          title: '属性管理',
          icon: 'HelpFilled'
        },
      },
      {
        path: '/product/sku',
        name: 'Sku',
        component: () => import('@v/product/sku/index.vue'),
        meta: {
          title: 'SKU',
          icon: 'List'
        },
      },
    ]
  },
]

export const asyncRoute = [
  
]